package com.xu.mapper;

import com.xu.pojo.Detail;
import com.xu.pojo.Invitation;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;
@Repository
public interface InMapper {
//查询所有的帖子表
  @Select("select * from Invitation ORDER BY createdate DESC")
  List<Invitation> getallin();
//模糊查询
  @Select("SELECT * from Invitation where title LIKE ${title}")
 List<Invitation> likebytitle(@Param("title") String title);

//  查看回复

  @Select("select * from reply_detail where id = #{id} ")
  List<Detail> getbyid( Integer id);
//删除
@Select("  delete from invitation where id = #{id}")
     int delInvi(Integer id);
}
